//
// Created by 郝羽 on 2018/6/15.
//

#ifndef RTC_XSWITCH2_METRIC_H
#define RTC_XSWITCH2_METRIC_H

#include <cstdint>
#include <map>

#include "stat.hpp"

struct Metric {
    int time;

    Histogram<int, 32> rtt;
    Histogram<int, 32> jitter;
    Histogram<int, 32> setup_time;
    Histogram<int, 32> ping_time;

    Counter<uint64_t> send;
    Counter<uint64_t> recv;
    Counter<uint64_t> send_packet;
    Counter<uint64_t> recv_packet;

    Counter<int> inited;
    Counter<int> setup;
};

typedef std::map<int, Metric> MetricsByTime;

#endif //RTC_XSWITCH2_METRIC_H
